package com.example.tsproject.mapper;

import com.example.tsproject.entity.Students;
import com.example.tsproject.entity.Teachers;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Optional;

/**
* @author DELL
* @description 针对表【teachers】的数据库操作Mapper
* @createDate 2024-09-24 21:09:14
* @Entity com.example.tsproject.entity.Teachers
*/
@Mapper
public interface TeachersMapper extends BaseMapper<Teachers> {

    @Select("SELECT * FROM teachers WHERE employee_number=#{employee_number} AND password=#{password}")
    Optional<Teachers> findTeachersJudge(@Param("employee_number") String employee_number, @Param("password") String password);

    @Select("SELECT * FROM teachers WHERE employee_number=#{employee_number}")
    Teachers findTeachers(@Param("employee_number") String employee_number);

}




